<?php
class ArticleController extends My_Controllers {
	public function indexAction() {
		$id = $this->_getParam ( 'id' );
		$news = $this->news->find ( $id );
		$news->current ()->news_view ++;
		$news->current ()->save ();
		
		$this->view->news = $news->current ();
		$this->view->doctor_arr = $this->user->find ( $news->current ()->news_uid )->toArray ();
		
		$this->view->lanmu_arr = $this->news->fetchAll ( array ('column_id = ?' => $news->current ()->column_id ), NULL, 10, 0 )->toArray ();
		$this->view->keshi_arr = $this->news->fetchAll ( array ('section_id = ?' => $news->current ()->section_id ), NULL, 10, 0 )->toArray ();
		
		$this->view->keshi = $this->keshi->find ( $news->current ()->section_id )->current ();
		$this->view->lanmu = $this->lanmu->find ( $news->current ()->column_id )->current ();
	}
}
		
